<template>
  <view>
    <text class="welcomeText">pinia测试</text>
    store: {{ store }}
    <uv-button type="primary" size="normal" text="测试pinia" @click="handlePiniaTest"></uv-button>
    <uv-safe-bottom></uv-safe-bottom>
  </view>
</template>

<script lang="ts" setup>
import Vue from 'vue';

import { useCounterStore } from "@/store/test/index";
// 可以在组件中的任意位置访问 `store` 变量 ✨
const store = useCounterStore();
console.log("🚀 ~ store:", store)
/*
 * @Description: 测试pinia数据
 * @Author: 杨科
 * @Date: 2023-12-01
 * @version: V1.0.0
 * @param:
 * @returns:
 */
function handlePiniaTest() {
  store.increment();
  console.log("🚀 ~ handlePiniaTest ~ store:", store);
  console.log("🚀 ~ handlePiniaTest ~ store:", store.count);
}
</script>

<style scoped></style>